package service

import (
	"zhonghui/console/warehouse/servicex"
	"zhonghui/console/warehouse/structx"
)

type BaseResp struct {
	Errcode int    `json:"errcode"`
	Errmsg  string `json:"errmsg"`
}

// HandleUserAvatar 处理用户头像
func HandleUserAvatar(avatar string) *structx.CommonImageData {
	oc, err := servicex.OssClient("normal")
	if err != nil {
		return nil
	}

	return oc.OssAvatarFullPathOrDefault(avatar)
}
